<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        * {
            margin: 0px;
            padding: 0px;
        }
        .a1 {
            width: 100px;
            height: 100px;
            border: 1px solid rgb(2, 2, 2);
            background-color: skyblue;
            margin: 0 auto;
            line-height: 100px;
            text-align: center;
            
        }
        .a2 {
            width: 100px;
            padding: 34px 0px;
            text-align: center;
            border: 1px solid rgb(2, 2, 2);
            background-color: rgb(225, 181, 231);
            position: absolute;
            left: 50%;
            margin-left: -51px;
        }
    </style>
</head>
<body> 
    <!-- 1. 实现一个盒子水平居中（起码两种方式） -->
    <div class="a1">
        盒子一
    </div>
    <div class="a2">
        我是一个盒子，我叫二
    </div>
</body>
</html>